package com.travel.controller.tourist_demand;

import com.travel.common.ServerResponse;
import com.travel.pojo.tourist_demand.TouristRecords;
import com.travel.service.tourist_demand.TouristRecordsServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TouristRecordsConreoller {
    @Autowired
    TouristRecordsServer touristRecordsServer;

    /**
     * 查询旅行记录接口
     * @param userid 用户id
     */
    @GetMapping("/selectTouristRecordsByUserId/{userid}")
    public ServerResponse<List<TouristRecords>> selectTouristRecordsByUserId(@PathVariable("userid") int userid){
        return touristRecordsServer.selectTouristRecordsByUserId(userid);
    }
}
